<?php
/**
 * Created by PhpStorm.
 * User: ysfl
 * Date: 2015/11/25
 * Time: 1:33
 * 商品视图,不同功能调用不同视图
 */

namespace app\admin\views;


class InventoryView extends AdminView
{
    function index($data)
    {
        //  使用app/templates/inventory/inventory.tpl.php视图
        $this->renderTpl('inventory/inventory', $data);
    }

    function  addInventory($data)
    {
        //  使用app/templates/inventory/add_inventory.tpl.php视图
        $this->renderTpl('inventory/add_inventory', $data);
    }

    function  queryInventory($data)
    {
        //  使用app/templates/nventory/query_inventory.tpl.php视图
        $this->renderTpl('inventory/query_inventory', $data);
    }

    function  addInventoryi($data)
    {
        //  使用app/templates/nventory/query_inventory.tpl.php视图
        $this->renderTpl('inventory/add_inventory_i', $data);
    }

    function  Inventory_Transfer($data)
    {
        //  使用app/templates/nventory/query_inventory.tpl.php视图
        $this->renderTpl('inventory/inventory_transfer', $data);
    }

    function Low($t,$n)
    {
        if ($t != "服务费" && $t != "二手")
        {
            switch($n)
            {
                case "0":
                    echo 'inventory-low-0';
                    break;

                case "1":
                    echo 'inventory-low-1';
                    break;

                case "2":
                    echo 'inventory-low-2';
                    break;
            }
        }
    }
}